-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update EIP-7702: add a few clarifications #8795
Conversation
✅ All reviewers have approved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All Reviewers Have Approved; Performing Automatic Merge...
|
||
1. `authority = ecrecover(keccak(MAGIC || rlp([chain_id, address, nonce])), y_parity, r, s]` | ||
2. Verify the chain id is either 0 or the chain's current ID. | ||
3. Add `authority` to `accessed_addresses` (as defined in [EIP-2929](./eip-2929.md).) | ||
4. Verify the code of `authority` is either empty or already delegated. | ||
5. Verify the nonce of `authority` is equal to `nonce`. | ||
6. Refund the sender `PER_EMPTY_ACCOUNT_COST - PER_AUTH_BASE_COST` gas if `authority` exists in the trie. | ||
6. Add `PER_EMPTY_ACCOUNT_COST - PER_AUTH_BASE_COST` gas to the global refund counter if `authority` exists in the trie. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great clarification! This is not how I have coded it right now (I thought the refund should be applied before the execution)
* feat(base_types): Add `keccak256` to `Bytes` * fix(fw): EIP-7702 types update * fix(types): nonce list logic removal * feat(types): Calculate signer if v,r,s parameters are in the Auth Tuple * feat(types/filler): Allow delegation on `pre.fund_eoa` * feat(types): Add `Literal["Self"]` as option to delegation in `pre.fund_eoa` * fix(plugins/filler): fix delegation check * fix(plugins/filler): delegation designation in case of `None` * feat(evm_transition_tool): `SetCodeDelegation` to transaction receipt * new(tests): EIP-7702 spec update * new(tests): EIP-7702 add all invalid auth tuples test * new(tests): EIP-7702 add multiple valid, self-sponsored test * fix(tests): EIP-7702 enable skipped tests * refactor(tests): EIP-7702 rename folder and files * new(tests): EIP-7702, some failing tests * fix(tests): EIP-7702 gas test * fix(tests): EIP-7702 move gas tests * new(tests): EIP-7702 intrinsic gas tests * fix(fixtures): tests * fix(tests): import * simplify parametrization * refactor(tests): EIP-7702 gas tests * new(tests): EIP-7702 more gas tests * new(tests): EIP-7702 parametrize and add new tests * fix(tests): EIP-7702 add check * feat(exceptions): Add two type-4 tx exceptions * new(tests): EIP-7702 tests * fix(tests): Update tests according to spec changes ethereum/EIPs#8795 * fix(tests): EIP-7702, use `named_parametrize` * fix(tests): EIP-7702 test not following spec * fix(tests): EIP-7702 test authorization list nonce/gas * fix(tests): EIP-7702 fix test_ext_code_on_chain_delegating_set_code * fix(tests): EIP-7702 fix test_set_code_all_invalid_authorization_tuples * fix(tests): EIP-7702 fix test_set_code_invalid_authorization_tuple * fix(tests): EIP-7702 system-contract tests * fix(tests): EIP-7702 tox * refactor(tests): EIP-7702 `parametrize_with_defaults` rename * fix(tests): EIP-7702 test_ext_code_on_set_code * fix(tests): EIP-7702 test_ext_code_on_set_code * fix(tests): EIP-7702 test_set_code_to_sstore * fix(tests): EIP-7702, add delegation designation to all expected outputs * fix(tests): EIP-7702, add delegation designation * new(tests): EIP-7702, add eoa tx after set code tests * refactor(tests): EIP-7702 update for parametrize_with_defaults -> extend_with_defaults (#758) * fix(tests): Marker * fix(tests): EIP-7702: pre-existing delegation gas tests * fix(tests): EIP-7702: fix warm costs expectations * fix(tests): EIP-7702 re-authorization tests * fix(tests): EIP-7702 warm account logic revamp * fix(tests): EIP-7702 test fixes * feat(tests): EIP-7702 add self-delegation warm cost test * fix(test): EIP-7702, test_call_into_self_delegating_set_code * fix(tests): EIP-7702 use kwargs on `with_all` markers * docs: Changelog * fix(tests): EIP-7702 return code expectations * fix(tests): EIP-7702 invalid tx on invalid signatures * Apply suggestions from code review Co-authored-by: danceratopz <[email protected]> --------- Co-authored-by: danceratopz <[email protected]>
Making some clarifications based on some discussions on discord. h/t @jochem-brouwer @rakita